<?php

class Application_Form_UserLogin extends Zend_Form
{

    public function init()
    {
        $this->setName("userLogin");
        $userName=new Zend_Form_Element_Text('userName');
        $userName->setLabel('请输入用户名');
        $userName->setRequired(true)
    		  ->addFilter('StripTags')
    		  ->addFilter('StringTrim')
    		  ->addValidator('NotEmpty')
    		  ->addValidator('StringLength',false,array(0,10,'UTF-8'));
        
        $userPass=new Zend_Form_Element_Password('userPass');
        $userPass->setLabel('请输入密码');
        $userPass->setRequired(true)
    		  ->addFilter('StripTags')
    		  ->addFilter('StringTrim')
    		  ->addValidator('NotEmpty')
    		  ->addValidator('StringLength',false,array(0,10,'UTF-8'));
    	$submit=new Zend_Form_Element_Submit('提交');
    	
    	$this->addElements(array($userName,$userPass,$submit));
    }


}

